<%@ page language="java" import="java.util.*,com.hs.auth.model.*,com.hs.auth.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
HsAccount accInfo = (HsAccount)request.getSession().getAttribute(AUTHConstant.USERINSESSION);
HsUserinfo userinfo = accInfo==null?null:accInfo.getUserinfo();
Map authMap = (Map)request.getSession().getAttribute("USERPOWER_"+accInfo.getId());
String authstr = null;
if(null != authMap){
	authstr = (String)authMap.get("HBP_ROLE02");
}  


%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head> 
<title></title>
<script src="<%=basePath %>app/javascripts/jquery-1.5.1.js"></script>
<script src="<%=basePath %>app/javascripts/layout.js"></script>
<link rel="stylesheet" type="text/css" href="<%=basePath %>app/css/layout.css"></link>
<script language=JavaScript>
function userManage(){ 
   <%if(null != authstr || "system".equals(accInfo.getLoginid())){%>
		window.parent.middle.frameElement.src  = "<%=basePath %>auth/userFrame.do";
	<%}else{%>
	   alert("只有管理员才有用户管理权限!");
	<%}%> 
}
function searchIndex(){ 
	window.parent.middle.frameElement.src  = "<%=basePath %>listHbpZhu.do"; 
}
function introIndex(){ 
	window.parent.middle.frameElement.src  = "<%=basePath %>app/dbintro.jsp"; 
}
function doctorIndex(){ 
	window.parent.middle.frameElement.src  = "<%=basePath %>listDoctor.do"; 
}
function oldbookIndex(){ 
	window.parent.middle.frameElement.src  = "<%=basePath %>listOldbook.do"; 
}
function basickmIndex(){ 
	window.parent.middle.frameElement.src  = "<%=basePath %>listBasic.do"; 
}
function hospitalIndex(){ 
	window.parent.middle.frameElement.src  = "<%=basePath %>listHospital.do"; 
}
function medchineIndex(){ 
	window.parent.middle.frameElement.src  = "<%=basePath %>listMedicine.do"; 
}

</script>
</head>
<body class="head_bg">
<div class="head">
    <img src="<%=basePath %>app/images/logo.gif" class="logo"/>
    <!-- img src="<%=basePath %>app/images/banner.png" class="banner" /-->
    <div class="banner"></div>
    <div class="head_right"> <script language=JavaScript>
                 today=new Date();                 
 function initArray(){                 
   this.length=initArray.arguments.length                 
   for(var i=0;i<this.length;i++)                 
   this[i+1]=initArray.arguments[i]  }                 
   var d=new initArray(                 
     "星期日",                 
     "星期一",                 
     "星期二",                 
     "星期三",                 
     "星期四",                 
     "星期五",                 
     "星期六");                 
document.write(                 
     "<font color=yellow style='font-size:9pt;font-family: 宋体'> ",                 
     today.getYear(),"年",                 
     today.getMonth()+1,"月",                 
     today.getDate(),"日",                 
     d[today.getDay()+1],                 
     "</font>" );
                  </script></div>
</div>
<div class="user">
	欢迎您：<font color=red><%=userinfo==null?"":userinfo.getUsername() %></font>
</div>
<ul>
	 <li><a href="javaScript:introIndex();" class="curr">数据库介绍</a></li>
     <li><a href="javaScript:searchIndex();" >期刊文献检索</a></li> 
     <li><a href="javaScript:oldbookIndex();" >方剂与食谱</a></li>
     <li><a href="javaScript:doctorIndex();" >医生检索</a></li> 
     <li><a href="javaScript:medchineIndex();" >药品检索</a></li> 
     <li><a href="javaScript:basickmIndex();" >基础知识</a></li>
     <li><a href="javaScript:hospitalIndex();" >医院信息</a></li>
    <li><a href="javaScript:userManage()">用户管理</a></li>
    <li><a href="<%=basePath %>logout.do">退出系统</a></li>
</ul>
</body>
</html>
